<extend name="Public/base" />

<block name="style">

</block>

<block name="body">
    <!-- 弹窗插件 -->
    <include file="Public:artdialog" />

    <div class="row">
        <div class="col-md-12">
            <div class="block-web">
                <!-- 商品列表 -->
                <form action="{:U('offer_details')}" method="post" id="SearchFrom" class="vform">
                    <div class="bgmain">
                        <div class="header">
                            <h3 class="content-header">采购单名:   {$wx_purchase_one.purchaseame}</h3>
                        </div>
                                   
                        <div class="block-web" style="margin: 0;padding:10px 20px 0px 0px;">
                            <div class="porlets-content">
                                <div class="row" style="margin-left:-45px;">
                                    <div class="col-md-12" style="padding-left:0px;">
                                        <div class="search_pannl_div">
                                            <table class="search_table table-condensed">
                                                <tbody>
                                                <tr>
                                                <td class="single-col">
                                                        <label>关键词：</label><input style="width:210px;" type="text" id="keywords" name="keywords" placeholder="输入商品名" value="{:I('param.keywords')}">
                                                        <button type="button" class="btn btn-success" formtarget="SearchFrom" id="searchBtn" onclick="goSearch()"><i class="fa fa-search"></i> 搜索</button>
                                                     <button type="button" class="btn btn-default" onclick="goAllSearch();"> 查看所有</button>
                                                        </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="load_tb_divs" style="padding:10px 0px 30px ;">
                          <table class="table table-striped goods_list_table   table-bordered">
                            <thead>
                                <tr>
                                
                                    <th class="opth70">商品名</th>
                                    <th class="opth70">采购数量</th>
                                    <th class="opth70">目标价格</th>
                                </tr>
                            </thead>
                            <tbody id="tbodylist">
                                <volist name="_datalist['lists']" id="g">
                                    <tr>
                                     
                                        <td>{$g['goodsname']}</td>
                                        <td>{$g['number']}</td>
                                        <td>{$g['price']}</td>
                            
                                    </tr>
                                </volist>

                                <empty name="_datalist['lists']">
                                    <tr>
                                        <td style="padding:30px;text-align:center;" colspan="10">
                                             暂无相关记录
                                        </td>
                                    </tr>
                                </empty>

                            </tbody>
                        </table>
                        <div class="page_list_ops dataTables_paginate paging_bootstrap pagination">
                            {$_datalist['page_html']}
                        </div>
                    </div>
                    <input type="hidden" name="listrows" id="listrows" value="{:I('param.listrows')}">
                    <input type="hidden" name="_page" id="_page" value="">
                    <input type="hidden" name="purchaseid" id="purchaseid" value="{$purchaseid}">
                </form>


            </div><!--/porlets-content-->
        </div><!--/block-web-->
    </div><!--/col-md-12-->

</block>

<block name="script">
   
    <script type="text/javascript">
 function goAllSearch(){
     $('#keywords').val('');
     $("#SearchFrom").submit();
 }
    function goSearch(){
                  $("#SearchFrom").submit();
              }
    function inputGoToPages(listrows){
        var page=$(listrows).val();
                $("#listrows").val(page);
                $("#SearchFrom").submit();
             }
             
    function selectGoToPages(page){
        var _page=$(page).val();
                $("#_page").val(_page);
                $("#SearchFrom").submit();
             }
</script>
</block>